package com.arvato.admin01.orm;

import com.arvato.admin01.pojo.Student;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;


import java.util.List;

/**
 * @author xu yuanjun
 * @data 2019/10/10 15:01
 */
@Mapper
public interface StudentMapper {

    @Select("SELECT uid, username,email,homeUrl FROM t_users")
    public List<Student> query();


    @Select("SELECT uid, username,email,homeUrl FROM t_users limit 1")
    public Student queryObject();

    @Select("SELECT username FROM t_users limit 1")
    public String queryString();

    @Select("INSERT INTO t_users(username, email) VALUES (#{name},#{email})")
    public void insert(@Param("name") String name,@Param("email") String email);
}
